<#-- 如果值为null/空，则设置为空值 -->
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Freemarker</title>
    <style type="text/css">
        #all {
            width: 600px;
        <#-- 使文档在pdf页面居中 --> margin: auto;
        }

        table {
            width: 100%;
            height: auto;
        <#-- @@提醒@@：此处必须指定字体，不然不识别中文  --> font-family: SimSun;
            text-align: center;
        <#-- table中单元格自动换行 --> table-layout: fixed;
            word-wrap: break-word;
        }

        tr td {
            padding: 2px;
            font-size: 10px;
            height: 20px;
        }

        tr th {
            padding: 2px;
            font-weight: bold;
            font-size: 10px;
            height: 20px;
        }
    </style>
</head>
<body>
<div id="all">
    <table border="1" cellspacing="0" cellpadding="0" align="center">
        <tr>
            <th colspan="5">${title}</th>
        </tr>
        <tr>
            <#-- 动态获取params的大小size -->
            <th rowspan="${params?size+1}">基本信息</th>
            <td>姓名</td>
            <td>电话</td>
            <td>昵称</td>
            <td>邮箱</td>
            <td>数量</td>
        </tr>
        <#list params as param>
            <tr>
                <td>${param.name}</td>
                <td>${param.phone}</td>
                <td>${param.nickname}</td>
                <td>${param.email}</td>
                <td>${param.num}</td>
            </tr>
        </#list>
    </table>
</div>
</body>
</html>
